package week3;

import java.util.Scanner;

public class report1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double kg;
        double m;
        double BMI;
        System.out.println("请输入体重：");
        kg = scanner.nextDouble();
        System.out.println("请输入身高：");
        m = scanner.nextDouble();
        BMI = kg / (m * m);
        System.out.printf("您的BMI值为：%.2f\n", BMI);
        if (BMI < 18.4) {
            System.out.println("您的体重情况：偏瘦");
        } else if (BMI >= 18.5 && BMI <= 23.9) {
            System.out.println("您的体重情况：正常");
        } else if (BMI >= 24.0 && BMI <= 27.9) {
            System.out.println("您的体重情况：稍微超重");
        } else { // bmi >= 28.0
            System.out.println("您的体重情况：超重");
            scanner.close();
        }
    }
}
